home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / fileat.zip / FILEATTR.DOC < prev   
Text File  |  1993-01-04  |  5KB  |  102 lines

  1.                              FILE ATTRIBUTE UTILITY
  2.                                   Version 4.0
  3.                                November 30, 1987
  4.  
  5.                                  by Steve Trace
  6.                                  OPUS Net 157/1
  7.  
  8.  
  9. FA allows you to view and manipulate  your  file  attributes.  Like  DOS's  3.x
  10. ATTRIB  program  you  can  set  files to be Read Only which prevents accidental
  11. erasure however it also allows you to mark or unmark a file as  Hidden,  System
  12. or Archive as well.
  13.  
  14. FA  is very similar to Norton's Utility FA and even more like Charles Petzold's
  15. ATTR published in the June 10,  1986  PC  Magazine.  In  fact  the  syntax  and
  16. capabilities  are  identical  to  ATTR.  The main reason for my writing of this
  17. utility is that I failed to get ATTR to run even after checking my input of the
  18. published Assembly Program 5 times.  FA was written in Turbo Pascal so is  much
  19. larger  than  the  625  bytes  of  the ATTR and runs a bit slower but IT WORKS!
  20. However thanks to Charles' excellent article I was able to create this  program
  21. and  make sub-directories  disappear.  Hidden  programs but not system programs
  22. may be run from the DOS prompt with DOS 3.x but not 2.x.  A  utility program is
  23. included to run hidden programs under DOS 2.x.
  24.  
  25. Possible Uses:
  26.  
  27.    Read-Only
  28.  
  29.    The use of this parameter allows you to protect files from being deleted,
  30.    or  written  over.  However  you  can always reverse your setting of this
  31.    attribute so you can update a file  or  install  a  newer  version  of  a
  32.    program.  Excellent  for preventing erasure of program files or important
  33.    data files.  The major problem is you must remove the Read-Only  or  copy
  34.    file under another name to update data files.
  35.  
  36.    Archive
  37.  
  38.    All  files are set as Archive when newly created or updated.  This allows
  39.    DOS's BACKUP command with the /M switch to backup  only  new  or  updated
  40.    files.  On  occasion  you may have no need to backup newly created files.
  41.    Simply turn off this attribute for selected files  prior  to  backing  up
  42.    your hard disk.
  43.  
  44.    Hidden
  45.  
  46.    This  parameter  if set (+) will hide your files from searches using DIR,
  47.    COPY,  DEL ect.  Handy for hiding sub-directories and still allows you to
  48.    change into them using DOS's CD command.  I've include another program EX
  49.    that allows you to execute hidden programs under DOS 2.x.  Hidden but not
  50.    system program files may be executed  as usual under DOS 3.x.  EX  syntax
  51.    is as follows:
  52.  
  53.       A>EX 123.COM
  54.  
  55.    Note  that  the  extension  must  be included for the program to execute.
  56.    Also you may not pass parameters with your program. (ie, A>EX FA.EXE *.*)
  57.    Under DOS 2.x EX.EXE may not be hidden.
  58.  
  59.    System
  60.  
  61.    Basically the same as Hidden.
  62.  
  63. Syntax
  64.  
  65.    [d:][path\]FA [options] [d:][path\]filespec
  66.  
  67.    options:
  68.       + : Turns Attribute On
  69.       - : Turns Attribute Off
  70.  
  71.       +A or -A : Archive Attribute Switched
  72.       +H or -H : Hidden Attribute Switched
  73.       +S or -S : System Attribute Switched
  74.       +R or -R : Read-Only Attribute Switched
  75.  
  76.    If  entered without any parameters you will receive a syntax error message
  77.    and the proper syntax.  The filespec is required and it  may  contain
  78.    wildcards * and ?.  If issued without any switching Parameters (ie, -A +H)
  79.    you  merely  receive a listing of all files,  including hidden and system,
  80.    with their current attribute settings.
  81.  
  82.  
  83.    Version 1 would give an error using DOS 3.x as CHMOD gave a return code
  84.    identical to the file's attribute value.  This caused an abort whenever
  85.    a file was marked as hidden only or system only.  Version 2 corrects this
  86.    by ignoring the error return code.  While this seems drastic, the only
  87.    valid codes under 2.x were file not found or path not found.  These errors
  88.    are handled when the directory search is made, so why duplicate?
  89.  
  90.    Version 2 is unmodified in version 2a.  The only change is the documentation
  91.    which indicates hidden but not system program files may be executed as
  92.    usual under DOS 3.x.
  93.  
  94.    Version 4 is an upgrade to Turbo Pascal 4.0, has an improved path message
  95.    and improved error messages.  As a result of using 4.0 the executable and
  96.    source file sizes have been reduced.  Even though FA.EXE is smaller than
  97.    FA.COM under Turbo Pascal 3.0, use of the original source run against the
  98.    Turbo Pascal 4.0 utility UPGRADE.EXE produced an even smaller file.  The
  99.    only reason I can determine is that my own FindFirst, FindNext and CHMOD
  100.    functions and procedures generate tighter code than Borland's FindFirst,
  101.    FindNext and SetFAttr.  Hard to believe since I only used the msDos(regs)
  102.    routine and not assembly language.